<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<link href="css/global.css" type="text/css" rel="stylesheet" />
		<script language="javascript" src="js/jquery-1.6.2.min.js"></script>
		<script type="text/javascript">
		$(document).ready(function(){
			 $(function () {
	            $("#tb tr").mouseover(function () {
	                $(this).addClass("over");
	            });
	            $("#tb tr").mouseout(function () {
	                $(this).removeClass("over");
	            });
	            $("#tb tr:even").attr("bgcolor","#FFFFFF");
	        }); 
		});
		</script>
	</head>
	
	<body>
		<div class="div1">
			<div class="position">
				<div style="float: left;">
					<img src="images/dangqian25.gif" style="float: left;" />
					<span style="padding-left: 2px;">发送列队</span>
				</div>
				<div style="float: right; padding-right: 3px; padding-top: 1px;">
					<!--<input
						style="background: url(images/xinzeng.gif) no-repeat; margin-right: 3px;"
						id="btnAdd" type="button" value="条件搜索" class="button"
						onclick="addShowDialog()" />
				 	<input style="background: url(images/shan.gif) no-repeat;"
						id="btnDelete" type="button" value="删除" class="button"
						onclick="batchDelete()" />
  					-->
				</div>
			</div>
			<div id="search" style="margin-top: 2px;">
				<fieldset style='padding: 10px; word-break: break-all;'>
		 	 	<legend style='font-weight:bold;font-size:large;'>详细内容</legend>
		 	 	<table width='100%' class="btable">
		 	 	<tr><td style="text-align: left;">批次号码：${batchid }</td></tr>
		 	 	<tr><td style="text-align: left;">发送内容：<br/><br/><span style="font-family: sans-serif;">${message}</span></td></tr>
		 	 	<tr><td style="text-align: right;">字数：${messagelen}</td></tr>
		 	 	<c:if test="${stype==2}">
		 	 	<tr><td style="text-align: left;">定时时间：<fmt:formatDate value="${sendtime }"  type="date" pattern="yyyy-MM-dd HH:mm"/></td></tr>
		 	 	</c:if>
		 	 	</table>
		 	 	</fieldset>
			</div>
			<div class="div2">
				<table id="tb" width="100%" border="0" cellpadding="0" cellspacing="0">
 					<tr>
						<th>
							序号
						</th>
						<th>
							号码
						</th>
						<th>
							通道
						</th>
						<th>
							状态
						</th>
						<th>
							时间
						</th>
					</tr>
					<c:forEach items="${raskQueryList}" var="item" varStatus="status">
					<tr>
						<td>${status.count }</td>
						<td>${item.mobile }</td>
						<td><p:viewChannel channelid="${item.channelid }" col="2"/></td>
						<td>
							<c:choose>
								<c:when test="${item.status==1 }">等待发送</c:when>
								<c:when test="${item.status==2 }">发送失败</c:when>
								<c:when test="${item.status==3 }"><span style="color:red;">&nbsp;定时发送</span></c:when>
								<c:otherwise>未知状态</c:otherwise>
							</c:choose>
						</td>
						<td><fmt:formatDate value="${item.createtime }"  type="date" pattern="yyyy-MM-dd HH:mm"/></td>
					</tr>
					</c:forEach>
				</table>
			</div>
		</div>
	</body>
</html>
